home *** CD-ROM | disk | FTP | other *** search
- Option Explicit
-
- Function GetOemId(objReg)
- '{
- Dim szOemId, bObfuscate
- GetOemId = False
-
- If objReg Is Nothing Then
- Exit Function
- End If
-
- bObfuscate = objReg.Obfuscate
- objReg.Obfuscate = True
-
- GetOemId = objReg.RegQueryValue( DB_REGKEY_OEM, DB_REGVAL_OEMID )
-
- objReg.Obfuscate = bObfuscate
- '}
- End Function
-
- Function GetOEMIniFile(objReg, objFS, objOS)
- '{
- Dim szTemp
-
- GetOEMIniFile = ""
- szTemp = objReg.RegQueryValue( DB_REGKEY_OEM_LINK_STR, DB_OEM_INI )
-
- If ( szTemp <> "" ) Then
- If ( False = objFS.IsFile( szTemp ) ) Then
- szTemp = ""
- End If
- End If
-
- If ( szTemp = "" ) Then
- szTemp = objOS.GetObjectModuleDir( CLSID_MCAgent ) & DEF_OEM_INI_FILE
- End If
-
- If ( szTemp <> "" ) Then
- If ( False = objFS.IsFile( szTemp ) ) Then
- Exit Function
- End If
- Else
- Exit Function
- End If
-
- GetOEMIniFile = szTemp
-
- '}
- End Function
-
- Function GetNewsTitleOEM()
- '{
- Dim szOEMIniFile
- szOEMIniFile = GetOEMIniFile(gDBobjReg, gDBobjFS, gDBobjOS)
- If ("" <> szOEMIniFile) Then
- GetNewsTitleOEM = gDBobjReg.IniGetValue(szOEMIniFile, OEMINI_OEMNEWS_SECTION, OEMINI_OEMTITLE_VALUE)
- Else
- GetNewsTitleOEM = ""
- End If
- '}
- End Function
-
- Function GetNewsStringOEM()
- '{
- Dim szOEMIniFile
- szOEMIniFile = GetOEMIniFile(gDBobjReg, gDBobjFS, gDBobjOS)
- If ("" <> szOEMIniFile) Then
- GetNewsStringOEM = gDBobjReg.IniGetValue(szOEMIniFile, OEMINI_OEMNEWS_SECTION, OEMINI_OEMNEWS_VALUE)
- Else
- GetNewsStringOEM = ""
- End If
- '}
- End Function
-
- Function ShowTab(szAppID, szOEMIniFile, nDefault)
- '{
- Dim szHomePage
-
- ShowTab = nDefault
- If ("" <> szOEMIniFile) Then
- ShowTab = gDBobjReg.IniGetValue(szOEMIniFile, OEMINI_SHOWTABS_SECTION, szAppID)
- End If
-
- szHomePage = gObjDashboard.GetApplicationInfo( CStr(szAppID), DB_HOMEPAGE )
-
- If (0 < Len(szHomePage)) Then
- ShowTab = 1
- End If
-
- '}
- End Function
-
- Function IsPlus(szAppID, szOEMIniFile, bDefault)
- '{
- Dim dwPlus
-
- IsPlus = bDefault
- If ("" <> szOEMIniFile) Then
- dwPlus = gDBobjReg.IniGetValue(szOEMIniFile, szAppID, OEMINI_PLUS_KEY)
- If (1 = dwPlus) Then
- IsPlus = True
- Else
- IsPlus = False
- End If
- End If
-
- '}
- End Function
-
-
- Function GetAppIndex(szAppID, szOEMIniFile, ByRef objReg)
- '{
-
- Dim dwIndex
-
- ' Sameer(02/15/2005): By default the app indices are always hidden. Basically, they are controlled
- ' by the tab values. If tab is hidden then indices are hidden otherwise they are displayed. If
- ' we forcefully create a value in OEMCFG.INI with <AppId>=1 then the indices will be shown no matter
- ' what is the state of the tab. This was done for backward compatibility where partners expected
- ' the tab to be hidden but they wanted the index. For these partners we have create <Appid>=1
- ' under the Security_Index section in OEMCFG.INI.
-
- GetAppIndex = 0
-
- If Not objReg Is Nothing Then
- '{
-
- If ("" <> szOEMIniFile) Then
-
- dwIndex = objReg.IniGetValue(szOEMIniFile, OEMINI_SECURITY_INDEX, szAppID )
-
- If "" <> dwIndex Then
- '{
-
- If ( CLng(0) <> CLng(dwIndex) ) Then
- GetAppIndex = 1
- Else
- GetAppIndex = 0
- End If
-
- '}
- End If
-
- End If
-
- '}
- End If
-
- '}
- End Function
-
-
- Function GetOEMLogo(szOEMIniFilePath, objReg, objFS, objOS, szDefault)
- '{
- Dim szLogoPath, szLogoFile, szLogoUIFilePath
- Const szLogoUIFile = "oemlogo.ui"
-
- GetOEMLogo = szDefault
- szLogoPath = objOS.GetObjectModuleDir( CLSID_MCAgent )
- If ("" <> szLogoPath) Then
- szLogoFile = objReg.IniGetValue( szOEMIniFilePath, MYS_SECTION, OEMINI_SEC_CEN_LOGO_FILE )
- If ("" <> szLogoFile) Then
- '{
- ' Check if a UI file exists
- szLogoUIFilePath = szLogoPath & "\" & szLogoUIFile
- If (True = objFS.IsFile(szLogoUIFilePath)) Then
- '{
- GetOEMLogo = szLogoUIFile & "::" & szLogoFile
- '}
- Else
- '{
- szLogoPath = szLogoPath & "\" & szLogoFile
- If (True = objFS.IsFile(szLogoPath)) Then
- GetOEMLogo = szLogoPath
- End If
- '}
- End If
- '}
- End If
- End If
- '}
- End Function
-
- Function GetExpiryNag(objReg, objFS, objOS, nDefault)
- '{
- Dim szIniPath, szValue
- GetExpiryNag = nDefault
-
- szIniPath = GetOEMIniFile(objReg, objFS, objOS)
-
- If ("" <> szIniPath) Then
- szValue = objReg.IniGetValue(szIniPath, MYS_SECTION, OEMINI_EXPIRY_INFO)
- If ("" <> szValue) Then
- GetExpiryNag = CLng(szValue)
- End If
- End If
- '}
- End Function
-
-
- Function ShowSecurityNews()
- '{
- Dim szOEMIniFile, strShowSecNews
-
- ShowSecurityNews = True
- strShowSecNews = ""
-
- szOEMIniFile = GetOEMIniFile(gDBobjReg, gDBobjFS, gDBobjOS)
- If ("" <> szOEMIniFile) Then
- strShowSecNews = Trim(CStr(gDBobjReg.IniGetValue(szOEMIniFile, OEMINI_OEMNEWS_SECTION, OEMINI_SHOWSECNEWS_KEY)))
- End If
-
- If "" <> strShowSecNews Then
- '{
- If "0" = strShowSecNews Then
- ShowSecurityNews = False
- End If
- '}
- End If
- '}
- End Function
-
-
- Function ShowStoreLink()
- '{
- Dim szOEMIniFile, strShowStoreLink
-
- ShowStoreLink = True
- strShowStoreLink = ""
-
- szOEMIniFile = GetOEMIniFile(gDBobjReg, gDBobjFS, gDBobjOS)
- If ("" <> szOEMIniFile) Then
- strShowStoreLink = Trim(CStr(gDBobjReg.IniGetValue(szOEMIniFile, OEMINI_OEMNEWS_SECTION, OEMINI_SHOWSTORELINK_KEY)))
- End If
-
- If "" <> strShowStoreLink Then
- '{
- If "0" = strShowStoreLink Then
- ShowStoreLink = False
- End If
- '}
- End If
- '}
- End Function
-
-
- Function ShowCustSupportLink()
- '{
- Dim szOEMIniFile, strShowCustSupportLink
-
- ShowCustSupportLink = 1
- strShowCustSupportLink = ""
-
- szOEMIniFile = GetOEMIniFile(gDBobjReg, gDBobjFS, gDBobjOS)
- If ("" <> szOEMIniFile) Then
- strShowCustSupportLink = Trim(CStr(gDBobjReg.IniGetValue(szOEMIniFile, MYS_SECTION, OEMINI_SHOW_CUSTSUPPORT_LINK_KEY)))
- End If
-
- If "" <> strShowCustSupportLink Then
- '{
- If "0" = strShowCustSupportLink Then
- ShowCustSupportLink = 0
- End If
- '}
- End If
- '}
- End Function
-
-
- Function ShowHelpLink()
- '{
- Dim szOEMIniFile, strShowHelpLink
-
- ShowHelpLink = 1
- strShowHelpLink = ""
-
- szOEMIniFile = GetOEMIniFile(gDBobjReg, gDBobjFS, gDBobjOS)
- If ("" <> szOEMIniFile) Then
- strShowHelpLink = Trim(CStr(gDBobjReg.IniGetValue(szOEMIniFile, MYS_SECTION, OEMINI_SHOW_HELP_LINK_KEY)))
- End If
-
- If "" <> strShowHelpLink Then
- '{
- If "0" = strShowHelpLink Then
- ShowHelpLink = 0
- End If
- '}
- End If
- '}
- End Function
-
-
- Function GetCustomHelpUrl()
- '{
- Dim szOEMIniFile, strCustomHelpUrl
-
- GetCustomHelpUrl = ""
- strCustomHelpUrl = ""
-
- szOEMIniFile = GetOEMIniFile(gDBobjReg, gDBobjFS, gDBobjOS)
- If ("" <> szOEMIniFile) Then
- strCustomHelpUrl = Trim(CStr(gDBobjReg.IniGetValue(szOEMIniFile, MYS_SECTION, OEMINI_CUSTOM_HELP_LINK)))
- End If
-
- If "" <> strCustomHelpUrl Then
- '{
- GetCustomHelpUrl = strCustomHelpUrl
- '}
- End If
-
- '}
- End Function
-
- Function GetCustomSupportUrl()
- '{
- Dim szOEMIniFile, strCustomSupportUrl
-
- GetCustomSupportUrl = ""
- strCustomSupportUrl = ""
-
- szOEMIniFile = GetOEMIniFile(gDBobjReg, gDBobjFS, gDBobjOS)
- If ("" <> szOEMIniFile) Then
- strCustomSupportUrl = Trim(CStr(gDBobjReg.IniGetValue(szOEMIniFile, MYS_SECTION, OEMINI_CUSTOM_CUSTSUPPORT_LINK)))
- End If
-
- If "" <> strCustomSupportUrl Then
- '{
- GetCustomSupportUrl = strCustomSupportUrl
- '}
- End If
-
- '}
- End Function
-
- Function GetWindowsFirewallUpsellURL(ByRef objReg, ByRef objFS, ByRef objOS)
- '{
- Dim szOEMIniFile, strURL
-
- GetWindowsFirewallUpsellURL = MYS_WIN_FW_UPGRADE_URL
- strURL = ""
-
- szOEMIniFile = GetOEMIniFile(objReg, objFS, objOS)
- If ("" <> szOEMIniFile) Then
- strURL = Trim(CStr(objReg.IniGetValue(szOEMIniFile, UPSELL_SECTION, OEMINI_UPSELL_WINFW)))
- End If
-
- If "" <> strURL Then
- '{
- GetWindowsFirewallUpsellURL = strURL
- '}
- End If
- '}
- End Function
-
- Function GetNAVUpsellURL(ByRef objReg, ByRef objFS, ByRef objOS)
- '{
- Dim szOEMIniFile, strURL
-
- GetNAVUpsellURL = NORTON_UPGRADE_URL
- strURL = ""
-
- szOEMIniFile = GetOEMIniFile(objReg, objFS, objOS)
- If ("" <> szOEMIniFile) Then
- strURL = Trim(CStr(objReg.IniGetValue(szOEMIniFile, UPSELL_SECTION, OEMINI_UPSELL_NAVAV)))
- End If
-
- If "" <> strURL Then
- '{
- GetNAVUpsellURL = strURL
- '}
- End If
- '}
- End Function
-
- Function HideLink(szOEMIniFile, bDefault, szTabName, szLinkName)
- '{
- Dim dwHideLink
-
- HideLink = bDefault
- If ("" <> szOEMIniFile) Then
- dwHideLink = g_localObjReg.IniGetValue(szOEMIniFile, szTabName, szLinkName)
- if IsNumeric(dwHideLink) Then
- if (0 <> dwHideLink) Then
- HideLink = True
- End if
- End If
- End If
-
- '}
- End Function